#ifndef TABLEVIEW_H
#define TABLEVIEW_H

#include <QPointer>
#include <QTableView>

class HierarchicalHeaderView;

class TableView : public QTableView
{
    Q_OBJECT
public:
    explicit TableView (QWidget *parent = 0);

    bool isHierarchicalHeaderEnabled() const;
    HierarchicalHeaderView* hierarchicalHeader() const;
    Qt::MouseButtons pressedMouseButton() const;

public slots:
    virtual void setHierarchicalHeaderEnabled (bool enable);

protected:
    virtual void mousePressEvent (QMouseEvent* event);

    QPointer<HierarchicalHeaderView> m_hierarchicalHeaderView;
    Qt::MouseButtons m_pressedMouseButton;

protected slots:
    void columnCountChanged (int oldCount, int newCount);
};

#endif // TABLEVIEW_H
